package com.supreme.studyserver.thread;

import java.util.concurrent.TimeUnit;

/**
 * 继承Thread方法
 */
public class ExtThread extends Thread {

    private int count;

    public ExtThread(int count) {
        this.count = count;
    }

    @Override
    public void run() {
        for (int i = 0; i < count; i++) {
            try {
                System.out.println("QumThread: " + i);
                TimeUnit.SECONDS.sleep(1);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
